package com.jingsheng.jingshengcity.di.module;

import com.jess.arms.di.scope.ActivityScope;
import com.jingsheng.jingshengcity.mvp.contract.HomePageFragmentContract;
import com.jingsheng.jingshengcity.mvp.model.HomePageFragmentModel;

import dagger.Module;
import dagger.Provides;


/**
 * Created by Administrator on 2017/5/5.
 */

@Module
public class HomePageFragmentModule {
    private HomePageFragmentContract.View view;

    /**
     * 构建HomePageFragmentModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public HomePageFragmentModule(HomePageFragmentContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    HomePageFragmentContract.View provideHomePageFragmentView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    HomePageFragmentContract.Model provideHomePageFragmentModel(HomePageFragmentModel model) {
        return model;
    }
}